package com.zhejiangzhengyuan.municipal_common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.sql.Timestamp;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 进行登录主体认证以及退出操作的日志记录
 * </p>
 *
 * @author linju
 * @since 2019-11-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="AuthenticationLog对象", description="进行登录主体认证以及退出操作的日志记录")
public class AuthenticationLog extends Model<AuthenticationLog> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "认证主体的名称，目前为用户名")
    private String subjectName;

    @ApiModelProperty(value = "行为分为：认证、退出")
    private String action;

    @ApiModelProperty(value = "请求路径：当前常规情况存在两种路径")
    private String url;

    @ApiModelProperty(value = "记录创建时间")
    private Timestamp createTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
